#include "ProcBar.h"
void progressBar()
{
    char bar[NUM];
    const char *lable = "|/-\\";
    memset(bar, 0, sizeof(bar));
    int i = 0;
    int j = 0;
    while(i <= 100)
    {
        printf("\033[36m[%-50s]\033[0m \033[?25l [%-3d%%] [%c] \r", bar, i, lable[i%4]);
        fflush(stdout);
        if(i%2 == 0)
        {
          bar[j++] = '=';
        }
        usleep(100000);
        i++;
    }
    printf("\n");
    printf("\033[?25h");
}
